<?php
/* @var $this TicketsApizaco2Controller */
/* @var $model TicketsApizaco2 */

  $this->widget('bootstrap.widgets.TbBreadcrumbs', array(
    'links'=>array('Tickets'=>array('index'),  
        'Administrador'),
));



/*
$this->menu=array(
	array('label'=>'List Tickets', 'url'=>array('index')),
	array('label'=>'Create Tickets', 'url'=>array('create')),
);
*/
Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$('#tickets-apizaco2-grid').yiiGridView('update', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<table>
    <td WIDTH=800  ALIGN=right>
        <?php
        
$this->widget('bootstrap.widgets.TbButton', array(
    'label'=>'Lista de Tickets',
    'type'=>'primary', // 
    'size'=>'small', // null, 'large', 'small' or 'mini'
    'url'=>array('index')
)); 

        ?>
    </td>
    <br>
    <td >
        <?php
        $this->widget('bootstrap.widgets.TbButton', array(
    'label'=>'Crear Tickets',
    'type'=>'primary', // null, 'primary', 'info', 'success', 'warning', 'danger' or 'inverse'
    'size'=>'small', // null, 'large', 'small' or 'mini'
    'url'=>array('create')
)); 
        ?>
        
    </td>
    
</table>
<h1>Administrador de Tickets</h1>


<?php echo CHtml::link('Advanced Search','#',array('class'=>'search-button')); ?>
<div class="search-form" style="display:none">
<?php $this->renderPartial('_search',array(
	'model'=>$model,
)); ?>
</div><!-- search-form -->



<?php $this->widget('bootstrap.widgets.TbGridView', array(
        'type'=>'Default',
	'id'=>'tickets-grid',
	'dataProvider'=>$model->search(),
    'template'=>"{items}",
	'filter'=>$model,
	'columns'=>array(
		/*'id',*/
		'nombre_sucursal',
		'descripcion_problema',
		'encargado',
		'fecha_inicio',
		'fecha_fin',
		/*
		'estatus',
		'proridad',
		*/
		array(
			'class'=>'CButtonColumn',
		),
	),
)); ?>


